<!-- This page asks students for their specialization. They can choose
     from a drop down menu.
     
     Upon clicking submit, they are led to the Verification page. -->

<%@page import="support.*, java.util.*, java.sql.*, javax.sql.*" %>
<%@ taglib uri="http://struts.apache.org/tags-html" prefix="html" %> 
<%@ taglib uri="http://struts.apache.org/tags-bean" prefix="bean"%>
<%@taglib uri="/WEB-INF/struts-logic.tld" prefix="logic" %>

<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>

<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Specializations Page</title>
</head>
<body>

<CENTER>
<h1> Graduate School Application </h1>
<h2> Specializations Page </h2>
</CENTER>

<!-- Display data collected from previous pages. -->
<b>First Name:</b> <bean:write name="studentsinfoform" property="first" />
<span style="padding-left:20px"><b>Middle Initial:</b> <bean:write name="studentsinfoform" property="middle" /></span>
<span style="padding-left:20px"><b>Last Name:</b>  <bean:write name="studentsinfoform" property="last" /> </span>
<p>
<b>Country of Citizenship:</b> <bean:write name="citizenshipform" property="citizen" /> <p>
<b>Country of Residence:</b> <bean:write name="residenceform" property="residence"/> <p>
<b>Country of Residency:</b> <bean:write name="residencyform" property="residency"/> <p>


<b>Address:</b><p>

	<logic:present name="addressform" property="street">
			<span style="padding-left:20px"><b>Street:</b> <bean:write name="addressform" property="street" /> <p></span>
	</logic:present>
	<logic:present name="addressform" property="city">
			<span style="padding-left:20px"><b>City:</b> <bean:write name="addressform" property="city" /> </span>
	</logic:present>	
	<logic:present name="addressform" property="lstate">
			<span style="padding-left:20px"><b>State:</b> <bean:write name="addressform" property="lstate" /> </span>
	</logic:present>
	<logic:present name="addressform" property="zip">
			<span style="padding-left:20px"><b>Zip Code::</b> <bean:write name="addressform" property="zip" /> <p></span>
	</logic:present>
	
	<b>Phone Number:</b> (<bean:write name="addressform" property="areaCode" />) 
	                     (<bean:write name="addressform" property="pnumber" />) <p>



<logic:iterate id="degreeId" name="degreeform" property="degrees" >
==========================================================
<p><b>Location:</b> <bean:write name="degreeId" property="stuState"/></p>
<p><b>School:</b> <bean:write name="degreeId" property="school"/></p>
<p><b>Discipline of degree:</b> <bean:write name="degreeId" property="discp"/>
						 <bean:write name="degreeId" property="title"/></p>
<p><b>Degree earned in:</b> <bean:write name="degreeId" property="dmonth"/>
					 <bean:write name="degreeId" property="dyear"/></p>
<p><b>GPA: </b><bean:write name="degreeId" property="gpa"/></p>
<p><b>Transcript: </b><bean:write name="degreeId" property="fileName"/></p>
</logic:iterate>
<!-- End of displaying collected information. -->

<br><b>Please specify your specialization.</b>

<% 
   	support s = new support();   	
   	
    String path4 = config.getServletContext().getRealPath("specializations.txt");

    Vector specializations = s.getSpecializations(path4); 
    String spec = "";

%>


<html:form action="/specialization">

<!-- Drop down menu that contains all the possible specializations. -->
Specialization:
<html:select name = "degreeform" property="specialization" >
<%
    for( int i = 0; i < specializations.size(); i++ )
    {
%>
    <html:option value="<%=specializations.get(i).toString()%>" >
    <%= specializations.get(i).toString() %></html:option>

<%
    }
%>
</html:select>
<p>
<br><INPUT TYPE="submit" VALUE="submit">
</html:form>



</body>
</html>